﻿using DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.StyleElements
{
    [XmlRoot("gradientFill", Namespace = Constants.ExcelMain)]
    public class GradientFill : XmlSerializable
    {
        [Optional]
        [XmlAttribute("type", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_GradientType> GradientType { get; set; }

        [Optional]
        [XmlAttribute("degree", Form = XmlSchemaForm.Qualified)]
        public Nullable<double> Degree { get; set; }

        [Optional]
        [XmlAttribute("left", Form = XmlSchemaForm.Qualified)]
        public Nullable<double> Left { get; set; }

        [Optional]
        [XmlAttribute("right", Form = XmlSchemaForm.Qualified)]
        public Nullable<double> Right { get; set; }

        [Optional]
        [XmlAttribute("top", Form = XmlSchemaForm.Qualified)]
        public Nullable<double> Top { get; set; }

        [Optional]
        [XmlAttribute("bottom", Form = XmlSchemaForm.Qualified)]
        public Nullable<double> Bottom { get; set; }

        [Optional]
        [XmlElement("stop", Namespace = Constants.ExcelMain)]
        public XmlList<Stop> Stops { get; set; }

        public GradientFill() { }
    }
}
